package com.hqyj.serviceImpl;

import com.hqyj.mapper.RoleMapper;
import com.hqyj.mapper.UserMapper;
import com.hqyj.pojo.Role;
import com.hqyj.serviceInf.RoleServiceInf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleServiceInf {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public int insertUserRole(int userid, int roleid) {
        return roleMapper.insertUserRole(userid, roleid);
    }

    @Override
    public List<Role> selectAllRole() {
        return roleMapper.selectAllRole();
    }

    @Override
    public int deleteUserRole(int id) {
        return roleMapper.deleteUserRole(id);
    }
}
